
typedef struct Variable
   {
    int dim;
    int scope;
    int type;
    int addr;
    int array_start[10];
    int array_end[10];
   }Variable;

typedef struct else_attr
{
    int true_label;
    int fals_label;
    int type;
}else_attr;

typedef struct if_attr
{
    int true_label;
    int false_label;
}if_attr;

typedef struct while_attr
{
    int true_label;
    int false_label;
}while_attr;

typedef struct for_attr
{
    int true_label;
    int false_label;
    int id_pos;
    int for_index_reg;
}for_attr;

typedef struct begin_attr
{
    int scope;
}begin_attr;

typedef struct switch_attr
{
    int type;
    int labels[100];
    int label_num;
    int next_label;
    int test_label;
    union
    {
	int iconst[100];
	float fconst[100];
    };
}switch_attr;

typedef struct int_var_attr
{
    char name[1024];
    int index;
}int_var_attr;

typedef struct otherwise_attr
{
    int otherwise_label;
}otherwise_attr;

typedef struct Number
   {
    union
    {
      int ival;
      double fval;
    };
    int type;
    int register_index;
   }Number;

struct id_def
{
    int var_index[1030];
    int var_num;
};

struct array_def
{
    int var_index[1030];
    int array_var_num;
};

struct arraydim_type
{
    int dim;
    int array_start[10];
    int array_end[10];
};

struct function_param
{
    char name[10][1024];
    int type[10];
    int param_n;
};

struct function_info
{
    char name[1024];
    char param_name[10][1024];
    int  param_addr[10];
    int  param_type[10];
    int  param_n;
    int  return_addr;
    int  return_type;
};

struct arg_info
{
    int arg_n;
    int type[10];
};
